package com.example.teamilkmall.controller.exception;

/**
 * @author wangl
 * @date 2024/10/12
 * 自定义异常的父类
 */
public class GlobalException extends RuntimeException {

    private Integer errorCode;

    public GlobalException(ErrorsEnum e) {
        super(e.message());
        this.errorCode = e.code();
    }

    public Integer getErrorCode() {
        return errorCode;
    }
}